package com.bstek.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import com.bstek.urule.KnowledgePackageReceiverServlet;

@SuppressWarnings({ "rawtypes", "unchecked" })
@Component
public class URuleServletRegistration {

	@Value("${urule.localApiPath}")
	private String localApiPath;

	@Bean
	public ServletRegistrationBean registerURuleServlet(){
		System.out.println("初始化客户端接口知识包端口:"+localApiPath);
		return new ServletRegistrationBean(new KnowledgePackageReceiverServlet(),localApiPath);
	}
}

